import {
  createApp
} from 'vue'
import './style.css'
import App from './App.vue'
import router from './router/index'
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// import store from './store'
import AV from "leancloud-storage";
import {
  ID,
  KEY,
  DOMAIN
} from "./config";
import store from './store';
// LeanCloud初始化
AV.init({
  appId: ID,
  appKey: KEY,
  serverURL: DOMAIN,
});



let app = createApp(App)
app.use(router)
app.use(store)
let info = JSON.parse(localStorage.getItem('vue-admin-userinfo'))
if (info) {
  store.commit('user/initUserInfoMut', info)
}
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.mount("#app");